import { makeObservable, observable, action, computed } from 'mobx'


class Store {
    constructor() {
        makeObservable(this)
    };

    @observable count = 10;

    @observable info = { name: "luyi" };

    @action.bound
    add_count() {
        this.count = this.count + 1
    }

    @computed get double() {
        return this.count * 2
    }
    
}

export default new Store()